<template>
  <div>
   <input type="button" value="添加购物车" @click="addShopping"/>
    <!-- <input type="button" value="删除购物车" @click="deleteShopping"/> -->
    <input  type="button" value="支付" @click="pay"/>
    <input type="button" value="登录" @click="login"/>

  </div>


</template>

<script>
export default{
  name:"Main",
  data(){
    return{
      orderNum:"1925448310555021312"

    }
  },
  methods:{
  login(){
    this.$http.post("/user/account/login",{
      username:"zhangsan",
      pass:"123456",
      type:"3"
    }).then(resp=>{
      console.log(resp.data.data)

    })
  },
  pay(){
    this.$http.post("/order/dietOrder/pay/"+this.orderNum).then(resp=>{
   document.write(resp.data.data)
    })
  }

  }
}
</script>

<style scoped>

</style>
